/* Personnalisez la barre de défilement */
::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}
/* Styles de base */
body {
    font-family: Arial, sans-serif;
    line-height: 1.8;
    color: #333;
    margin: 0;
    padding: 0;
}

.listeSections{

    z-index: 90;
}
.overlay {
    display:none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center,rgba(0,0,0,0.8) 25%, rgba(0,0,0,0.6) 50%, rgba(0,0,0,0.4) 100%);
    min-width: 100%;
    min-height: 100%;
}

.loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Flexbox Sticky Footer */
html, body {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.page-container {
    flex: 1 0 auto;
}

footer {
    position: fixed;
    bottom: 0;
    background-color: #f1f1f1;
    text-align: center;
    padding: 0rem;
    width: 100%;
    transition: all 0.2s cubic-bezier(0.42, 0, 0.58, 1) 0s;
    z-index:90;
}
footer.shrink {
    height: 25px;
    font-size: 10px;
    padding: 0rem;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: #4CAF50;
    padding: 1rem;    
    transition: all 0.2s cubic-bezier(0.42, 0, 0.58, 1) 0s;
    justify-content: space-between;
    z-index: 90;
}
header.shrink {
    font-size: 10px;
    padding: 0rem;
}

header h1 {
    color: #fff;
    text-align: center;
    margin: 0;
}
header.shrink h1 {
    margin: 0;
}


select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: transparent;
    border: none;
    outline: none;
    padding: 0.5rem;
    font-size: 16px;
    border-radius: 4px;
    border: 1px solid #ccc;
    cursor: pointer;
  }
select:hover{
    background-color: #4caf5020;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

  select:focus {
    border-color: #0077cc;
  }
  
  select::-ms-expand {
    display: none;
  }
  
  select option {
    background-color: white;
    color: #333;
  }

#editreserv-date_statut{
    border-radius: 4px;
    border: 1px solid #ccc;
    cursor: pointer;
    box-shadow: unset;
    width: 11em;
    height: 1em;
}
#editreserv-date_statut:hover{
    background-color: #4caf5020;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.listeSections {
    position: fixed;
    top: 80px; /* Hauteur du header */
    left: 0;
    right: 0;
    background-color: #333;
    padding: 0.5rem;
    transition: all 0.2s cubic-bezier(0.42, 0, 0.58, 1) 0s;
}

.listeSections.shrink {
    top: 30px;
    padding: 0px;
}

.listeSections ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.listeSections li {
    border-right: 1px solid #969696;
    padding-right: 10px; /* Pour espacer un peu les éléments */
  }
  
  .listeSections li:last-child {
    border-right: none; /* Supprime la bordure à droite du dernier élément */
  }

.listeSections ul li {
    margin: 0 0.5rem;
}

.listeSections ul li a {
    color: #fff;
    text-decoration: none;    
    padding: 0.5rem;
    transition: all 0.2s cubic-bezier(0.42, 0, 0.58, 1) 0s;
}

.listeSections li::first-letter {
    text-transform: capitalize;
}

.listeSections a.current {
    background-color: #4CAF50;
}
  
main {
    padding: 0.2rem;
    margin-top: 100px; /* Hauteur du header */
}

section {
    margin-top: 2rem;
}
section h2{
    margin-top: 10px;
    margin-bottom: 0px;
}
section p{
    text-align: left;
}
.sections-flottantes{
    flex: 0 0 calc(40% - 1rem);
    background-color: rgba(128, 128, 128, 0.25); /* couleur grise transparente */
    border-radius: 10px; /* coins arrondis de 10px */
    padding: 20px; /* espace intérieur de 20px */
    height: auto;
    max-height: 40vh;
    overflow-y: auto;
}
.sections-flottantes.shrink{
    max-height: 60vh;
    overflow-y: auto;
}
.sections-flottantes img {
    max-width:300px;
    height: auto;
}

.menu-icon {
    display: inline-block;
    width: 30px;
    height: 20px;
    position: relative;
    cursor: pointer;
    left: 0;
}
  
.menu-icon span {
    display: block;
    position: absolute;
    height: 3px;
    width: 100%;
    background: #333;
    border-radius: 3px;
    opacity: 1;
    left: 0;
    transform: rotate(0deg);
    transition: .25s ease-in-out;
}

.menu-icon span:nth-child(1) {
top: 0px;
}

.menu-icon span:nth-child(2),
.menu-icon span:nth-child(3) {
top: 8px;
}

.menu-icon span:nth-child(4) {
top: 16px;
}

.menu-icon.open span:nth-child(1),
.menu-icon.open span:nth-child(4) {
top: 8px;
width: 0%;
left: 50%;
}

.menu-icon.open span:nth-child(2) {
transform: rotate(45deg);
}

.menu-icon.open span:nth-child(3) {
transform: rotate(-45deg);
}


/* Styles pour le menu "slide" */
.slide-menu {
    position: fixed;
    left: -400px;
    top: 124px;
    bottom: 0;
    background-color: #333;
    width: 400px;
    max-width: 80vw;
    min-width: 250px;
    transition: all 0.3s ease-in-out;
    z-index: 100;
}
.slide-menu.shrink {
    top: 58px;
}

.slide-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.slide-menu ul li {
    padding: 10px;
    border-bottom: 1px solid #666;
}

.slide-menu ul li a {
    color: #fff;
    text-decoration: none;
    font-size: 1.2rem;
    transition: all 0.3s ease-in-out;
    display: block;
}

.slide-menu ul li a:hover {
    background-color: #4CAF50;
}

.slide-menu li::first-letter {
    text-transform: capitalize;
}

.slide-menu.show {
    left: 0;
}
main.shrink {
    margin-top: 20px;
}

.menulogin {
    position: absolute;
    bottom:0px;
    padding: 10px;
}

.slide-menu .has-submenu > a:after {
    content: ' ▾';
    display: inline-block;
    margin-left: 5px;
    transition: transform 0.3s ease-in-out;
}

.slide-menu .has-submenu.active > a:after {
    transform: rotate(180deg);
}


.slide-menu .submenu {
    display: block;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
}
.slide-menu .submenu li{
    padding: 0px 0px 0px 20px;
    border-bottom: none;
}
.slide-menu .has-submenu.active > .submenu {
    max-height: 1000px;
}

.btns_login{
    margin-bottom: 30px;
    margin-left: 10px;
}
.btns_login td{
    padding-bottom: 20px;
}
.icon_utilisateur img {
    width: 70px;
    display: flex;
    margin: 5px;
    border-radius: 7px; 
    padding:2px;
    background:white;
}

.menubtn{
    width: 75px;
    display: flex;
    padding-left: 5px;
    padding-right: 5px;
    margin: 5px;
}

.slide-menu .nohover a:hover{
    background-color: unset;
}

.slide-menu .m_id_signin img{
    padding: 2px 0px;
    display: inline-block;
    cursor: pointer;
    width: 245px;
}

.switch-container {
    display: inline-block;
    margin-right: 10px;
    border-radius: 20px;
    border: 1px solid #ccc;
    padding-right: 10px;
  }
  
  .switch-container .switch,
  .switch-container .lblSwitch {
    display: inline-block;
    vertical-align: middle;
  }
  
  .switch-container .switch {
    position: relative;
    width: 60px;
    height: 34px;
  }
  
  .switch-container .switch input[type="checkbox"] {
    display: none;
  }
  
  .switch-container .slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    border-radius: 34px;
    transition: .4s;
  }
  
  .switch-container .slider::before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: #fff;
    border-radius: 50%;
    transition: .4s;
  }
  
  .switch-container input:checked + .slider {
    background-color: #2196F3;
  }
  
  .switch-container input:checked + .slider::before {
    transform: translateX(26px);
  }
  
  .switch-container input:not(:checked) + .slider::before,
  .switch-container input:not(:checked) + .slider::after {
    opacity: 0.5; /* rendre le texte plus léger */
  }
  
  .switch-container .lblSwitch:not(:last-child) {
    transition: opacity 0.4s;
  }
  
  .switch-container input:checked + .slider::before,
  .switch-container input:checked + .slider::after,
  .switch-container input:not(:checked) + .slider:hover::before,
  .switch-container input:not(:checked) + .slider:hover::after,
  .switch-container input:not(:checked):hover + .slider::before,
  .switch-container input:not(:checked):hover + .slider::after {
    opacity: 1;
  }
  
  .switch-container::after {
    content: "";
    clear: both;
    display: table;
  }
  
  /* Styler le label */
  .switch-container .lblSwitch {
    margin-left: 10px;
    font-family: sans-serif;
    font-size: 14px;
    color: #444;
    transition: opacity 0.4s;
  }
  
/* Media queries pour la réactivité */
@media (min-width: 768px) {
    nav ul {
        justify-content: flex-start;
    }

    nav ul li {
        margin-right: 1rem;
    }

    main {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        margin-top: 100px;
    }

    section {
        flex: 0 0 calc(75% - 1rem);
        font-size: 1.25em;
        margin: 0 auto;
        margin-top: 2rem;
    }
    .sections-flottantes {
        font-size: 1.2em;
    }

    section p {
        margin: 0 auto; /* Centrer les paragraphes */
    }
}

@media (min-width: 1024px) {
    main {
        margin: 0 auto;
        margin-top: 100px;
    }

    nav ul {
        justify-content: space-between;
    }

    section {
        flex: 0 0 calc(75% - 1rem);
        font-size: 1.75em;
        margin: 0 auto;
        margin-top: 2rem;
    }
    .sections-flottantes {
        font-size: 1.4em;
    }

    section p {
        margin: 0 auto; /* Centrer les paragraphes */
    }
    
}


.nom_u{
    cursor:pointer;
    font-size:smaller;
    padding: 2px 6px;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
}
.nom_u:hover {
  background: #e3f2fd;
  color: #4caf50;
}
/* MODAL : renommé en profile-modal */
.profile-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0; top: 0; width: 100vw; height: 100vh;
  background: rgba(30,40,55,0.60);
  justify-content: center; align-items: center;
}
.profile-modal.open {
  display: flex;
}
.profile-modal-content {
  background: #fff;
  padding: 0.5rem 0.3rem 0.3rem 0.3rem;
  border-radius: 16px;
  max-width: 450px;
  width: 90vw;
  box-shadow: 0 4px 24px rgba(30,40,55,0.25);
  position: relative;
  animation: modalIn 0.25s;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-height: 90vh;       /* modal jamais plus grand que la fenêtre */
  overflow-y: auto;       /* ascenseur si contenu dépasse */
}

@keyframes modalIn {
  from { transform: translateY(60px) scale(0.95); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}

.profile-modal-content h2 {
  margin-top: 0; margin-bottom: 0rem;
  font-size: 1.25rem;
  text-align: center;
}

.label_u {
  display: flex;
  flex-direction: column;
  font-size: 1em;
  margin-bottom: 0.6em;
  gap: 0.2em;
}
.input_u, .textarea_u {
  padding: 0.5em;
  font-size: 1em;
  border: 1px solid #bbb;
  border-radius: 6px;
  background: #fafafa;
  transition: border 0.2s;
}
.input_u:focus, .textarea_u:focus {
  border: 1.5px solid #1976d2;
  outline: none;
}
.textarea_u {
  resize: vertical;
}

.readonly-fields {
  background: #f6f6fa;
  border-radius: 7px;
  padding: 0.6em 1em;
  font-size: 0.96em;
  color: #555;
  margin: 0.5em 0;
}
.readonly-fields div {
  margin: 0.2em 0;
}

.profile-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6em;
  margin-top: 0.8em;
  position: sticky;
  bottom: 0;
  background: #fff;
  padding-bottom: 0em;
  /* optionnel : bordure pour séparer visuellement */
  border-top: 1px solid #eee;
}
.btn-principal {
  background: #1976d2;
  color: #fff;
  border: none;
  border-radius: 7px;
  padding: 0.45em 1.4em;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-principal:hover {
  background: #1560a5;
}
.btn-secondaire {
  background: none;
  color: #1976d2;
  border: 1px solid #1976d2;
  border-radius: 7px;
  padding: 0.45em 1.4em;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.btn-secondaire:hover {
  background: #e3eafc;
}
.is-invalid {
    border: 1px solid red;
}
.error-message {
    color: red;
    font-size: 0.8em;
    margin-top: 2px;
}


#form-message {
  margin-top: 0.4em;
  min-height: 1.3em;
  font-size: 0.98em;
  text-align: center;
}

@media (max-width: 540px) {
  .profile-modal-content { padding: 1.1rem 0.3rem; }
  label { font-size: 0.98em; }
  .readonly-fields { font-size: 0.92em; }
}


.cacher {
    display:none;
}
